package gvo.dbinfo;
import gvo.util.GVOstore;

import java.util.ArrayList;

public class DBInfo {
	public ArrayList<TableInfo> tables = new ArrayList<TableInfo>();
	
	public DBInfo(){
		
	}
	
	public TableInfo findTable(String in){
		for ( TableInfo ti : tables ){
			if(ti.tableName.equals(in)){
				return ti;
			}
		}
		return null;
	}
	public void fillSelectTable(GVOstore varstor){
		varstor.getStrQuerys().addElement("");
		for ( TableInfo ti : tables ){
			varstor.getStrQuerys().addElement("Select * From "+ti.tableName);
		}
		
	}
	public void printDBInfo(){
		System.out.println("DATENBANKTABELLEN");
		System.out.println("*****************");
		for ( TableInfo ti : tables ){
			ti.printTableInfo();
		}
	}
}
